﻿using System;
using WickedFlame.Core;
using WickedFlame.Core.Shapes;
using WickedFlame.Core.History;


namespace WickedFlame.Util.Actions
{
    public class DeleteAction
    {
        public void DeleteSelection(DrawingCanvas canvas)
        {
            if (canvas.SelectedLayer.ShapeList.SelectionCount > 0)
            {
                canvas.PushHistoryCommand(new DeleteCommand(canvas.SelectedLayer.ShapeList, canvas.SelectedLayerIndex));
                canvas.RemoveSelection();
            }
        }

        public void DeleteShape(DrawingCanvas canvas, VectorShape shape)
        {
            throw new NotImplementedException();
        }
    }
}
